#include<cstdio>
int main()
{
	int a,b,c;
	scanf("%d%d",&a,&b);
	c=a/b;
	printf("%d %d\n",c,a-c*b);
}
